#include "SymbolConstant.hpp"
#include "Expression.hpp"
#include <string>

typedef std::string String;

SymbolConstant::SymbolConstant(Expression * expression) {
	if ( ! expression->isCalculated()) {
		this->expression = NULL;
	} else {
		this->expression = expression;
	}
}
	
SymbolConstant::~SymbolConstant() {
	delete this->expression;
}

Expression * SymbolConstant::getExpression() {
	return this->expression;
}

void SymbolConstant::show(){
	std::cout << "constante\ttype:";
	expression->getType()->show();
	std::cout << ",valeur:";
	expression->getValue()->show();
}

